import request from '@/utils/request'

// 分页查询
export function pageMemberGrade(qurey) {
  return request({
    url: '/user/memberGrade/paging',
    method: 'get',
    params: qurey
  })
}

// 批发商等级分页查询
export function pageWholesalerGrade(qurey) {
  return request({
    url: '/user/memberGrade/pagingWholesalerGrade',
    method: 'get',
    params: qurey
  })
}

/**
 * 批发商等级保存
 * @param data
 */
export function saveWholesalerGrade(data) {
  return request({
    url: '/user/memberGrade/saveWholesalerGrade',
    method: 'post',
    data: data
  })
}

/**
 * 保存
 * @param data
 */
export function saveMemberGrade(data) {
  return request({
    url: '/user/memberGrade/save',
    method: 'post',
    data: data
  })
}
/**
 * 删除品牌分类
 * @param query
 */
export function delMemberGrade(memberGradeId) {
  return request({
    url: '/user/memberGrade/delete',
    method: 'get',
    params: { memberGradeId: memberGradeId }
  })
}

/**
 * 微客等级集合
 * @param qurey
 */
export function listMemberGrade(enterpriseId) {
  return request({
    url: '/user/memberGrade/listMemberGrade',
    method: 'get',
    params: { enterpriseId: enterpriseId }
  })
}

/**
 * 批发商等级集合
 * @param qurey
 */
export function listWholesalerGrade(enterpriseId) {
  return request({
    url: '/user/memberGrade/listWholesalerGrade',
    method: 'get',
    params: { enterpriseId: enterpriseId }
  })
}
